<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script language="JavaScript">
	function event(){
		  if(M.SUBJECT.value==""){alert("이벤트명을 입력해주세요");}else
		  if(M.CONTENT.value==""){alert("이벤트 내용을 입력해주세요");}else
		  if(M.IMAGE1.value==""){alert("이미지는 필수적으로 들어가야합니다.");} else
		  if(M.IMAGE2.value==""){alert("이미지는 필수적으로 들어가야합니다.");} 
		  
		  M.Hi.value=M.YY.value+"."+M.MM.value+"."+M.DD.value+"~"+M.YY2.value+"."+M.MM2.value+"."+M.DD2.value+"까지";
		  document.M.submit();
	}
</script>
</head>
<body>
<%@include file="/WEB-INF/Top.jsp" %>
<br><Br><br><br>
<form action="add" method="POST" name="M" enctype="multipart/form-data">
<input type="hidden" id="Hi" name="EVENT_DATE" value="">
		<table align="center">
			<tr>
				<td>제목</td><td><input id="SUBJECT" type="text" name="EVENT_SUBJECT"></td> 
				<td>
			</tr>
			<tr>
				<td>내용</td><td><textarea id="CONTENT" name="EVENT_CONTENT" rows="2" cols="31" Tabindex="9"></textarea></td>
			</tr>
			<tr>
				<td>날짜</td>
				<td>
				<br>
				<select name="YY" size="1">
		    		<option value="2013">2013</option>
		    		<option value="2014">2014</option>
		    		<option value="2015">2015</option>
		    		<option value="2016">2016</option>
		    		<option value="2017">2017</option>
		    		<option value="2018">2018</option>
		    		<option value="2019">2019</option>
		    		<option value="2020">2020</option>
				</select>년
				<select name="MM" size="1">
		    		<option value="01">01</option>
		    		<option value="02">02</option>
		    		<option value="03">03</option>
		    		<option value="04">04</option>
		    		<option value="05">05</option>
		    		<option value="06">06</option>
		    		<option value="07">07</option>
		    		<option value="08">08</option>
		    		<option value="09">09</option>
		    		<option value="10">10</option>
		    		<option value="11">11</option>
		    		<option value="12">12</option>
				</select>월
				<select name="DD" size="1">
		    		<option value="01">01</option>
		    		<option value="02">02</option>
		    		<option value="03">03</option>
		    		<option value="04">04</option>
		    		<option value="05">05</option>
		    		<option value="06">06</option>
		    		<option value="07">07</option>
		    		<option value="08">08</option>
		    		<option value="09">09</option>
		    		<option value="10">10</option>
		    		<option value="11">11</option>
		    		<option value="12">12</option>
		    		<option value="13">13</option>
		    		<option value="14">14</option>
		    		<option value="15">15</option>
		    		<option value="16">16</option>
		    		<option value="17">17</option>
		    		<option value="18">18</option>
		    		<option value="19">19</option>
		    		<option value="20">20</option>
		    		<option value="21">21</option>
		    		<option value="22">22</option>
		    		<option value="23">23</option>
		    		<option value="24">24</option>
		    		<option value="25">25</option>
		    		<option value="26">26</option>
		    		<option value="27">27</option>
		    		<option value="28">28</option>
		    		<option value="29">29</option>
		    		<option value="30">30</option>
		    		<option value="31">31</option>
				</select>일 부터 <br>
				
				<select name="YY2" size="1">
		    		<option value="2013">2013</option>
		    		<option value="2014">2014</option>
		    		<option value="2015">2015</option>
		    		<option value="2016">2016</option>
		    		<option value="2017">2017</option>
		    		<option value="2018">2018</option>
		    		<option value="2019">2019</option>
		    		<option value="2020">2020</option>
				</select>년
				<select name="MM2" size="1">
		    		<option value="01">01</option>
		    		<option value="02">02</option>
		    		<option value="03">03</option>
		    		<option value="04">04</option>
		    		<option value="05">05</option>
		    		<option value="06">06</option>
		    		<option value="07">07</option>
		    		<option value="08">08</option>
		    		<option value="09">09</option>
		    		<option value="10">10</option>
		    		<option value="11">11</option>
		    		<option value="12">12</option>
				</select>월
				<select name="DD2" size="1">
		    		<option value="01">01</option>
		    		<option value="02">02</option>
		    		<option value="03">03</option>
		    		<option value="04">04</option>
		    		<option value="05">05</option>
		    		<option value="06">06</option>
		    		<option value="07">07</option>
		    		<option value="08">08</option>
		    		<option value="09">09</option>
		    		<option value="10">10</option>
		    		<option value="11">11</option>
		    		<option value="12">12</option>
		    		<option value="13">13</option>
		    		<option value="14">14</option>
		    		<option value="15">15</option>
		    		<option value="16">16</option>
		    		<option value="17">17</option>
		    		<option value="18">18</option>
		    		<option value="19">19</option>
		    		<option value="20">20</option>
		    		<option value="21">21</option>
		    		<option value="22">22</option>
		    		<option value="23">23</option>
		    		<option value="24">24</option>
		    		<option value="25">25</option>
		    		<option value="26">26</option>
		    		<option value="27">27</option>
		    		<option value="28">28</option>
		    		<option value="29">29</option>
		    		<option value="30">30</option>
		    		<option value="31">31</option>
				</select>일 까지
				<br><br>
				</td>
			</tr>
			<tr>
				<td>메뉴이미지</td><td><input id="IMAGE1" type="file" name="EVENT_IMAGE1"></td>
				<td>
			</tr>
			<tr>
				<td>메인이미지</td><td><input id="IMAGE2" type="file" name="EVENT_IMAGE2"></td> 
				<td>
			</tr>
			<tr>
				
				<td colspan="2" align="center"><br><input type="button" value="등록" onClick="event()"> <input type="reset" value="다시작성"></td>
			</tr>
		</table>
	</form>
</body>
</html>